<?php

	$table = "" .
		"<table>" .
			"<tr><td>Date:</td><td><b>" . $track->log->date . "<b></td></tr>" .
			"<tr><td>Time:</td><td><b>" . date('h:i:s A', strtotime($track->log->datetime)) . "<b></td></tr>" .
			"<tr><td>Activity:</td><td><b>" . $track->log->activity . "<b></td></tr>" .
			"<tr><td>Duration:</td><td><b>" . $track->log->duration . "<b></td></tr>" .
			"<tr><td>Distance:</td><td><b>" . $track->log->distance . " " . $track->log->distance_unit . "<b></td></tr>" .
			"<tr><td>Vertical up:</td><td><b><b></td></tr>" .
			"<tr><td>Vertical down:</td><td><b><b></td></tr>" .
			"<tr><td>Average speed:</td><td><b>" . $track->log->avg_speed . "<b></td></tr>" .
			"<tr><td>Max Speed:</td><td><b>" . $track->log->max_speed . "<b></td></tr>" .
			"<tr><td>Average Pace:</td><td><b><b></td></tr>" .
			"<tr><td>Best Pace:</td><td><b><b></td></tr>" .
			"<tr><td>Average Heart Rate:</td><td><b>" . $track->log->avg_hr . "<b></td></tr>" .
			"<tr><td>Max Heart Rate:</td><td><b>" . $track->log->max_hr . "<b></td></tr>" .
			"<tr><td>Time in Zone 1:</td><td><b>" . $track->log->z1_time . " / " . calculate_points($track->log,1) . "pts<b></td></tr>" .
			"<tr><td>Time in Zone 2:</td><td><b>" . $track->log->z2_time . " / " . calculate_points($track->log,2) . "pts<b></td></tr>" .
			"<tr><td>Time in Zone 3:</td><td><b>" . $track->log->z3_time . " / " . calculate_points($track->log,3) . "pts<b></td></tr>" .
			"<tr><td>Time in Zone 4:</td><td><b>" . $track->log->z4_time . " / " . calculate_points($track->log,4) . "pts<b></td></tr>" .
			"<tr><td>Time in Zone 5:</td><td><b>" . $track->log->z5_time . " / " . calculate_points($track->log,5) . "pts<b></td></tr>" .
			"<tr><td>Total Points:</td><td><b>" . calculate_points($track->log) . "<b></td></tr>";
			
			if(!empty($track->log->notes)) {
				$table .= "<tr><td valign=top>Notes:</td><td>" . $track->log->notes . "</td></tr>";
			}
			
			
		$table .= "</table>";
		
		echo addslashes($table);
?>